#include <iostream>
#include "Bloc.hpp"

Bloc::Bloc(std::vector < Instruction* > _listeInstruction )
{
  listeInstruction = _listeInstruction;
}

void Bloc::execute()
{
  for (unsigned int it=0;it<listeInstruction.size();it++){
    listeInstruction[it]->execute();
  }
}

void Bloc::display(const unsigned int shift) const
{
  std::cout << "{\n";
  for (unsigned int it=0;it<listeInstruction.size();it++){
    std::cout << "\t";
    listeInstruction[it]->display();
    std::cout << "\n";
  }
  std::cout << "}\n";
}

Bloc::~Bloc(){}
